<!DOCTYPE html>
<html lang="en">
<head>
<base href="${contextPath}/" />
    <meta charset="utf-8">
    <title>国际学院学生数据管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
    <meta name="author" content="Muhammad Usman">

    <!-- The styles -->
    <link id="bs-css" href="css/bootstrap-cerulean.min.css" rel="stylesheet">

    <link href="css/charisma-app.css" rel="stylesheet">
    <link href='bower_components/fullcalendar/dist/fullcalendar.css' rel='stylesheet'>
    <link href='bower_components/fullcalendar/dist/fullcalendar.print.css' rel='stylesheet' media='print'>
    <link href='bower_components/chosen/chosen.min.css' rel='stylesheet'>
    <link href='bower_components/colorbox/example3/colorbox.css' rel='stylesheet'>
    <link href='bower_components/responsive-tables/responsive-tables.css' rel='stylesheet'>
    <link href='bower_components/bootstrap-tour/build/css/bootstrap-tour.min.css' rel='stylesheet'>
    <link href='css/jquery.noty.css' rel='stylesheet'>
    <link href='css/noty_theme_default.css' rel='stylesheet'>
    <link href='css/elfinder.min.css' rel='stylesheet'>
    <link href='css/elfinder.theme.css' rel='stylesheet'>
    <link href='css/jquery.iphone.toggle.css' rel='stylesheet'>
    <link href='css/uploadify.css' rel='stylesheet'>
    <link href='css/animate.min.css' rel='stylesheet'>

    <!-- jQuery -->
    <script src="bower_components/jquery/jquery.min.js"></script>

    <!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- The fav icon -->
    <link rel="shortcut icon" href="img/favicon.ico">

</head>

<body>
    <!-- topbar starts -->
	<#include "commonPage/top.ftl">
	<!-- topbar ends -->
	<div class="ch-container">
		<div class="row">

			<!-- left menu starts -->
			<#include "commonPage/left.ftl">
			<!--/span-->
			<!-- left menu ends -->

        <noscript>
            <div class="alert alert-block col-md-12">
                <h4 class="alert-heading">Warning!</h4>

                <p>You need to have <a href="http://en.wikipedia.org/wiki/JavaScript" target="_blank">JavaScript</a>
                    enabled to use this site.</p>
            </div>
        </noscript>

        <div id="content" class="col-lg-10 col-sm-10">
            <!-- content starts -->
                <div>

    </div>

            <!--/学生基本信息显示-->
    <div class="row">
    <div class="box col-md-12">
    <div class="box-inner">
    <div class="box-header well" data-original-title="">
        <h2><i class="glyphicon glyphicon-user"></i> 添加项目信息</h2>


    </div>
    <div class="box-content">
	
    <table class="table table-striped table-bordered bootstrap-datatable datatable responsive">
	<form name="form" method="post" action="info/addInfo">
	<input type="hidden" id="s_id" name="info.s_id" value="${student.s_id}">
        <div class="form-group has-warning col-md-4">
            <label class="control-label" for="inputWarning1">姓名  : ${student.stuname!}</label>
            <br>
            <label class="control-label" for="inputWarning1">分数</label> 
            <input type="text" class="form-control" id="grade" name="info.grade"><br> 
            
            <label class="control-label" for="inputWarning1">描述</label> 
            <input type="text" class="form-control" id="description" name="info.description"><br> 
            
            <label class="control-label" for="inputWarning1">选择项目</label> 
            <div class="controls">						
			<select name="info.p_id" id="project" data-rel="chosen" onchange="showMsg()" style="width: 90px;" data-placeholder="请选择"> 
			<#list proList as list>
				<optgroup label="${list.ParentName!''}">
					<#list list.chirldList as clist>
					<option value="${clist.Id!''}" class="major"> ${clist.pname!''}</option>
					</#list>
				</optgroup>
				</#list>
			</select> 
			
			<br>
		</div>
            <br><br>
            <button type="button" onclick="javascript:add();"  class="btn btn-default" >添加</button>

            <button type="button"  onclick="self.location.href='${contextPath}/info'" class="btn btn-default" style="margin-left:200px">返回</button>

        </div>
        </FORM>
    </table>
    
    </div>
    </div>
    </div>
    <!--/span-->

    </div><!--/row-->



    <!-- content ends -->
    </div><!--/#content.col-md-0-->
</div><!--/fluid-row-->

    <!-- Ad, you can remove it -->

    <!-- Ad ends -->

    <hr>





</div><!--/.fluid-container-->

<!-- external javascript -->

<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>

<!-- library for cookie management -->
<script src="js/jquery.cookie.js"></script>
<!-- calender plugin -->
<script src='bower_components/moment/min/moment.min.js'></script>
<script src='bower_components/fullcalendar/dist/fullcalendar.min.js'></script>
<!-- data table plugin -->
<script src='js/jquery.dataTables.min.js'></script>

<!-- select or dropdown enhancer -->
<script src="bower_components/chosen/chosen.jquery.min.js"></script>
<!-- plugin for gallery image view -->
<script src="bower_components/colorbox/jquery.colorbox-min.js"></script>
<!-- notification plugin -->
<script src="js/jquery.noty.js"></script>
<!-- library for making tables responsive -->
<script src="bower_components/responsive-tables/responsive-tables.js"></script>
<!-- tour plugin -->
<script src="bower_components/bootstrap-tour/build/js/bootstrap-tour.min.js"></script>
<!-- star rating plugin -->
<script src="js/jquery.raty.min.js"></script>
<!-- for iOS style toggle switch -->
<script src="js/jquery.iphone.toggle.js"></script>
<!-- autogrowing textarea plugin -->
<script src="js/jquery.autogrow-textarea.js"></script>
<!-- multiple file upload plugin -->
<script src="js/jquery.uploadify-3.1.min.js"></script>
<!-- history.js for cross-browser state change on ajax -->
<script src="js/jquery.history.js"></script>
<!-- application script for Charisma demo -->
<script src="js/charisma.js"></script>
<script type="text/javascript">
function add(){
	var s_id = $("#s_id").val();
	var description = $("#description").val();
	var grade = $("#grade").val();
	var project =$("#project  option:selected").val();
	if(s_id==''||description==''||grade==''|| project==''||
			s_id==null||description==null||grade==null||project==null){
		alert("信息不能为空");
		console.log(s_id +"\n"+ description +"\n"+grade+"\n"+project);
		return false;
	}else{
		form.submit();
		}
	}
</script>
</body>
</html>
